<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>后台管理中心</title>
<?php echo $this->_var['system_css']; ?>
<?php echo $this->_var['system_js']; ?>
<script>
var editor;
KindEditor.ready(function(K) {
   editor = K.create('textarea[name="content"]', {
	resizeType : 1,
                    allowPreviewEmoticons : false,
                    allowImageUpload : false,
                    items : [
                        'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
                        'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
                        'insertunorderedlist', '|', 'emoticons']
    });  
});




 $(function(){
  $("#myform").validate({
	  rules: {
		  category_id:'required'
	  },
	  messages: {
		  category_id: '分类不能为空'
	  }
  });
})
</script>
</head>
<body>
<?php echo $this->fetch('message.html'); ?>
<div class="pad-10">
  <div class="common-form">
    <form name="myform" action="<?php echo $this->_var['site_url']; ?>admin/trade/template/edit/<?php echo $this->_var['data']['category_id']; ?>" method="post" id="myform" enctype="MULTIPART/FORM-DATA">
      <fieldset>
        <legend>基本信息</legend>
        <table width="100%" class="table_form">
          <tr>
            <td>分类</td>
            <td id="category_id_select"><select name="category_id" class="category_id">
                <option value="">==不选择==</option>
                
                
                 <?php echo $this->_var['category_option']; ?>                 
              
              
              </select>
              &nbsp; (如果已经添加过，将覆盖之前添加的内容)</td>
          </tr>
          <tr>
            <td width="80">内容</td>
            <td><textarea name="content" id="content" style="width:700px;height:300px;"><?php echo $this->_var['data']['content']; ?></textarea></td>
          </tr>
          <tr>
            <td width="80"></td>
            <td>排序：
              <input type="text" name="position"  class="input-text" id="position" size="10"/></td>
          </tr>
          <tr align="center">
            <td colspan="2"><input type="submit" value="提交" name="dosubmit" class="button"></td>
          </tr>
        </table>
      </fieldset>
    </form>
  </div>
</div>
</body>
</html>